<?php
/**
 * SEF component for Joomla! 1.5
 *
 * @author      ARTIO s.r.o.
 * @copyright   ARTIO s.r.o., http://www.artio.cz
 * @package     JoomSEF
 * @version     3.1.0
 * @license     GNU/GPLv3 http://www.artio.net/license/gnu-general-public-license
 */
 
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

$opts = array();
for ($i = 1; $i <= 10; $i++) {
    $opts[] = JHTML::_('select.option', $i, $i);
}
$maxLevelList = JHTML::_('select.genericlist', $opts, 'crawlerMaxLevel', 'class="classic" size="1"', 'value', 'text', 5);
?>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<input type="hidden" name="option" value="com_sef" />
<input type="hidden" name="task" value="" />
</form>

<div class="width-100">
<?php $this->showInfoText('COM_SEF_INFOTEXT_CRAWL', true); ?>

<fieldset class="adminform">
    <legend><?php echo JText::_('COM_SEF_CRAWLER_CONFIG'); ?></legend>
    
    <table class="admintable">
        <tr>
            <td class="key"><?php echo JHTML::_('tooltip', JText::_('COM_SEF_CRAWLER_ROOTURL_TT'), JText::_('COM_SEF_CRAWLER_ROOTURL'), '', JText::_('COM_SEF_CRAWLER_ROOTURL')); ?>:</td>
            <td><?php echo JURI::root(); ?><input type="text" id="crawlerRootUrl" name="crawlerRootUrl" value="" class="classic" size="40" /></td>
        </tr>
        <tr>
            <td class="key"><?php echo JHTML::_('tooltip', JText::_('COM_SEF_CRAWLER_MAXLEVEL_TT'), JText::_('COM_SEF_CRAWLER_MAXLEVEL'), '', JText::_('COM_SEF_CRAWLER_MAXLEVEL')); ?>:</td>
            <td><?php echo $maxLevelList; ?></td>
        </tr>
    </table>
</fieldset>

<fieldset class="adminform">
    <legend><?php echo JText::_('COM_SEF_CRAWLER_STATUS_TITLE'); ?></legend>
    
    <table class="admintable">
        <tr>
            <td width="140" class="key"><?php echo JText::_('COM_SEF_CRAWLER_STATUS'); ?>:</td>
            <td><span id="crawlerRunningValue"><?php echo JText::_('COM_SEF_CRAWLER_NOT_RUNNING'); ?></span></td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td class="key"><?php echo JText::_('COM_SEF_CRAWLER_CURRENT_LEVEL'); ?>:</td>
            <td><span id="crawlerLevelValue">0</span></td>
        </tr>
        <tr>
            <td class="key"><?php echo JText::_('COM_SEF_CRAWLER_CRAWLED_URLS'); ?>:</td>
            <td><span id="crawlerCrawledValue">0</span></td>
        </tr>
        <tr>
            <td class="key"><?php echo JText::_('COM_SEF_CRAWLER_URLS_TO_CRAWL'); ?>:</td>
            <td><span id="crawlerUrlsValue">0</span></td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2"><input type="button" id="crawlerButton" name="crawlerButton" class="classic" onclick="jsCrawlerButtonClicked();" value="<?php echo JText::_('COM_SEF_CRAWLER_START'); ?>" /></td>
        </tr>
    </table>
</fieldset>
</div>